package sanshui.system.trade.controller;

import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.logging.log4j.util.Strings;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import sanshui.system.trade.common.CommonResponse;
import sanshui.system.trade.common.CommonResult;
import sanshui.system.trade.db.entity.TradeResultVo;
import sanshui.system.trade.factory.trade.strategy.StrategyCode;
import sanshui.system.trade.factory.trade.strategy.StrategyFactory;
import sanshui.system.trade.model.TradeWorkerModel;
import sanshui.system.trade.pojo.ao.CreateBackTradeAo;
import sanshui.system.trade.pojo.ao.GetStrategyResultInfoAo;
import sanshui.system.trade.pojo.vo.GridStrategyResultInfo;
import sanshui.system.trade.pojo.vo.StrategyResultVo;
import sanshui.system.trade.service.IAccountService;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/strategy")
@Slf4j
public class StrategyController {

    @Resource
    IAccountService accountService;
    @Resource
    StrategyFactory strategyFactory;

    @ApiOperation(value = "获取策略的枚举")
    @RequestMapping(value = "/getAll", method = RequestMethod.GET)
    public CommonResponse<List<String>> createBackTrade() {
        return CommonResponse.ok(strategyFactory.getAllStrategyCode(),"查询成功");
    }
}
